# -*- coding:utf-8 -*-
# @time    : 2021/9/5 6:06
# @Author  : zhang jin xia
# @Filename: PyCharm

from app_po_project.app_project.page.base_page import BasePage


class AddressListPage(BasePage):
    # 提取元素
    # _addmember_ele=(MobileBy.XPATH, "//*[@text='添加成员']")
    _addmember_scroll_ele=('new UiScrollable(new UiSelector().scrollable(true).'
        'instance(0)).scrollIntoView(new UiSelector().'
        'text("添加成员").instance(0));')

    def goto_addmember(self):
        from app_po_project.page.add_member_page import AddMemberPage
        # 点击添加成员
        # self.find_and_click(*self._addmember_ele)
        # 滑动查找添加成员并点击
        self.scroll_find_and_click(self._addmember_scroll_ele)

        # 返回添加成员页面
        return AddMemberPage(self.driver)